
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
*/

#include "dvpp_cmdlist_util.h"
#include <linux/ktime.h>
#include <linux/time64.h>
#include <linux/timekeeping.h>

int64_t dvpp_cmdlist_get_usec()
{
    const int64_t ns_per_us = 1000;
    struct timespec64 t;
    ktime_get_real_ts64(&t);

    return (t.tv_sec * 1000000LL) + t.tv_nsec / ns_per_us;
}